from django.contrib import admin
from django.contrib.admin.models import LogEntry

from apps.ads.models import ContentCategory, Content
from apps.goods.models import *
# Register your models here.
from apps.users.models import Userwallet, AdminPay

admin.site.register(SKU)
admin.site.register(SPU)
admin.site.register(Brand)
# admin.site.register(GoodsChannel)
# admin.site.register(GoodsChannelGroup)
# admin.site.register(GoodsCategory)
# admin.site.register(SKUImage)
# admin.site.register(SPUSpecification)
# admin.site.register(SpecificationOption)
# admin.site.register(SKUSpecification)
# admin.site.register(ContentCategory)
admin.site.register(Content)
admin.site.register(Userwallet)
admin.site.register(AdminPay)

from django.contrib import admin

admin.site.site_header = '商城管理系统'
admin.site.site_title = '商城管理系统'
@admin.register(LogEntry)
class LogEntryAdmin(admin.ModelAdmin):
    """
    该类用于显示 admin 内置的 django_admin_log 表。
    其中，content_type 是指用户修改的 Model 名
    """
    list_display = ['action_time', 'user', 'content_type', '__str__']
    list_display_links = ['action_time']
    list_filter = ['action_time', 'content_type', 'user']
    list_per_page = 15
    readonly_fields = ['action_time', 'user', 'content_type',
                       'object_id', 'object_repr', 'action_flag', 'change_message']

